lobstercommon.name = "lobsterh5";

$(document).ready(function () {

    var id = lobstercommon.GetUrlParam("id");
    lobsterh5.GETAPI('tsForm.getformsingledata', { id: id }).then(retdata => {
        $('#head').text(retdata.head + "提交结果");

        var formresult = retdata.formresult;
        var html = '';
        formresult.forEach(item => {
            html += '<div class="subject">';
            html += '<div class="title">' + item.title + '</div>';
            if (item.text) {
                html += '<div class="text">' + JSON.stringify(item.text) + '</div>';
            } else {
                html += '<div class="text">无</div>';
            }
            html += '</div>';
        });
        $('#formresult').empty();
        $('#formresult').append(html)

        var otherinfo = retdata.otherinfo;
        $('#CreateTime').text(otherinfo.CreateTime);
        $('#WriteTimeLong').text(otherinfo.WriteTimeLong);
        $('#WriteDevice').text(otherinfo.WriteDevice);
        $('#WriteOS').text(otherinfo.WriteOS);
        $('#WriteBrower').text(otherinfo.WriteBrower);
        $('#WriteLocation').text(otherinfo.WriteLocation);
        $('#WriteIP').text(otherinfo.WriteIP);
    })
});